import Vue from 'vue'
import VueRouter from 'vue-router'
import Index from '../views/Index/Index.vue'
import login from '../views/Login/login.vue'
Vue.use(VueRouter)

const routes = [
  { path: '/',name: 'login',component: login},
  { path: '/Index',name: 'Index',component: Index,
    children: [
      { path: '/BasicInformation/Vehicle',name: 'Vehicle',component: () => import('../views/BasicInformation/Vehicle.vue')}, //车辆管理
      { path: '/BasicInformation/Owner',name: 'Owner',component: () => import('../views/BasicInformation/Owner.vue')}, //货主管理
      { path: '/BasicInformation/Outsource',name: 'Outsource',component: () => import('../views/BasicInformation/Outsource.vue')}, //外协单位管理
      { path: '/BasicInformation/OilCost',name: 'OilCost',component: () => import('../views/BasicInformation/OilCost.vue')}, //油费管理
      { path: '/BasicInformation/Circuit',name: 'Circuit',component: () => import('../views/BasicInformation/Circuit.vue')}, //线路管理
      { path: '/Role/Role',name: 'Role',component: () => import('../views/Role/Role.vue')}, //角色管理
      { path: '/Department/Department',name: 'Department',component: () => import('../views/Department/Department.vue')}, //部门管理
      { path: '/Contract/Carriage',name: 'Carriage',component: () => import('../views/Contract/Carriage.vue')}, //承运合同管理
      { path: '/Contract/CarriageApp',name: 'CarriageApp',component: () => import('../views/Contract/CarriageApp.vue')}, //货主合同审批
    ]
  },
  // {
  //   path: '/about',
  //   name: 'About',
  //   // route level code-splitting
  //   // this generates a separate chunk (about.[hash].js) for this route
  //   // which is lazy-loaded when the route is visited.
  //   component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
  // }
]

const router = new VueRouter({
  routes
})

export default router
